package cn.xz.mxxz.util

import android.widget.ImageView
import cn.xz.mxxz.base.BaseApplication
import cn.xz.mxxz.bean.HttpConfig
import com.bumptech.glide.Glide

object ImageUtils {

    //根据链接获取本地图片
    fun show(s: String): String{
        return BaseApplication.getContext().cacheDir.absolutePath + "/" + JsonUtil.getUrlName(
            HttpConfig.BASE_URL_IP + s)
    }

    //显示图片
    fun toShow(v: ImageView, l: String){
        Glide.with(BaseApplication.getContext()).load(l).into(v)
    }
}